# -*- coding: utf-8 -*-

# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html


class BilibiliPipeline(object):
    def process_item(self, item, spider):
        filename = 'bilibili.txt'

        with open(filename, 'a') as fp:
            fp.write(item['name'])
            fp.write('\n')
            fp.write(item['update'])
            fp.write('\n')

        return item
